package com.jeeplus.test.jlnu.tableManage.domain.query;

import com.jeeplus.test.jlnu.tableManage.domain.entity.JlnuTableManage;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;

@Data
public class TableManageQuery implements Serializable {

    private Integer id;

    /**
     * 所属部门id
     **/
    private String officeId;

    /**
     * 类型
     **/
    private String type;

    /**
     * 名称
     **/
    private String name;

    /**
     * 内容
     **/
    private String content;

    /**
     *
     **/
    private String operatorId;

    public JlnuTableManage makeCreateEntity() {
        JlnuTableManage tableManage = new JlnuTableManage();
        BeanUtils.copyProperties(this, tableManage);
        tableManage.setCreateById(operatorId);
        return tableManage;
    }

    public JlnuTableManage makeUpdateEntity(JlnuTableManage tableManage) {
        BeanUtils.copyProperties(this, tableManage);
        tableManage.setUpdateById(this.getOperatorId());
        return tableManage;
    }

}
